package com.xxx.mapper;

import com.xxx.pojo.ClassInfo;
import org.apache.ibatis.annotations.*;

import java.util.List;

public interface ClassInfoMapper {

    @Insert("insert into class values (#{types}, #{typesName},  #{order}, #{createTime}, #{updateTime}, #{createUser}, #{updateUser})")
    int addClassInfo(ClassInfo classInfo);

    @Select("select * from class")
    @ResultMap("classInfoResultMap")
    List<ClassInfo> selectAll();


    @Select("select * from class where types_name = #{typesName}")
    @ResultMap("classInfoResultMap")
    ClassInfo selectAllByTypesName(String typesName);

    @Delete("delete from class where types_name = #{typesName};")
    int delByTypesName(String typesName);

    int updateClassInfo(@Param("column")String column, @Param("updateTime")String updateTime,@Param("update_user")Long updateUser, @Param("data")String data,@Param("typesName")String typesName);


}
